//
// File:	TestEntities.hpp
// Author:	Thomas TISSOT-DUPONT
// E-mail:	<thomas.tissotdupont@free.fr>
// Create:	27/04/2010 20:04:17
// Purpose:	
//
#ifndef TESTENTITIES_HPP
#define TESTENTITIES_HPP

#include "Base.hpp"
#include "BaseEntity.hpp"

//------------------------------------------------------------------
// EnvAmbientSound
//------------------------------------------------------------------
class EnvAmbientSound : public BaseEntity
{
	DECLARE_ENTITY(EnvAmbientSound);

public:
	void					OnCreate();
	void					OnCreateDataMap();

private:
	std::string				m_soundPath;
	bool					m_bSpatialization;
};

//------------------------------------------------------------------
// FXTemporary
//------------------------------------------------------------------
class FXTemporary : public BaseEntity
{
	DECLARE_ENTITY(FXTemporary);

public:
	void					OnCreate();

public:
	static BaseEntity		*LoadEffect(const std::string &fileName, const std::string &animName);
};

//------------------------------------------------------------------
// Missile
//------------------------------------------------------------------
class Missile : public BaseEntity
{
	DECLARE_ENTITY(Missile);

public:
	void					OnCreate();

public:
	void					Update();

public:
	static BaseEntity		*CreateMissile(float flCenterX, float flCenterY, float flVelocityX = 0.0f, float flVelocityY = 0.0f);
};

//------------------------------------------------------------------
// BigPink
//------------------------------------------------------------------
class BigPink : public BaseEntity
{
	DECLARE_ENTITY(BigPink);

public:
	void				OnCreate();
	void				Update();

public:
	void				Close();
	void				Open();

public:
	void				Missile_Update(BaseEntity *pMissile);
	void				Missile_Remove(BaseEntity *pMissile);
};

//------------------------------------------------------------------
// BasePlayer
//------------------------------------------------------------------
class BasePlayer : public BaseEntity
{
	DECLARE_ENTITY(BasePlayer);

	enum ColorName
	{
		Invalid = 0,
		Blue,
		Cyan,
		Purple,
		Green,
		Red,
		MaxColors		// = 5
	};
	struct Color
	{
		Color(unsigned char r = 0, unsigned char g = 0, unsigned char b = 0, unsigned char a = 0)
			: r(r), g(g), b(b), a(a)
		{
		}
		unsigned char		r;
		unsigned char		g;
		unsigned char		b;
		unsigned char		a;
	};

public:
	void								OnCreate();
	void								OnDestroy();

public:
	void								Update();

public:
	void								SetColorName(ColorName);

public:
	static const std::string			&GetPlayerSprite(ColorName);
	static const Color					&GetPlayerColor(ColorName);

private:
	float								m_flNextShootTime;
	Color								m_color;
	BaseEntity							*m_pArrow;
};

//------------------------------------------------------------------
// ScrollEntity
//------------------------------------------------------------------
class ScrollEntity : public BaseEntity
{
	DECLARE_ENTITY(ScrollEntity);

public:
	void		Update();
};

//------------------------------------------------------------------
// SpawnPoint
//------------------------------------------------------------------
class SpawnPoint : public BaseEntity
{
	DECLARE_ENTITY(SpawnPoint);

public:
	void		Update();
};

#endif //!TESTENTITIES_HPP
